home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / obsolete / student1_t.pro < prev    next >
Text File  |  1997-07-08  |  789b  |  41 lines

  1. ; $Id: student1_t.pro,v 1.2 1997/01/15 04:02:19 ali Exp $
  2. ;
  3. ;  Copyright (c) 1991-1997, Research Systems Inc.  All rights
  4. ;  reserved. Unauthorized reproduction prohibited.
  5.  
  6.  
  7. function student1_t ,X, DF
  8. ;+
  9. ; NAME:
  10. ;    STUDENT1_T
  11. ;
  12. ; PURPOSE: 
  13. ;    STUDENT1_T returns the probability that an observed value from the
  14. ;    Student's t distribution with DF degrees of freedom is less than |X|.
  15. ;
  16. ; CATEGORY:
  17. ;    Statistics.
  18. ;
  19. ; CALLING SEQUENCE:
  20. ;    Result = STUDENT1_T(X, DF)
  21. ;
  22. ; INPUTS:
  23. ;    X:    Cutoff.
  24. ;
  25. ;    DF:    Degrees of freedom.
  26. ;
  27. ; OUTPUT:
  28. ;       The probability of |X| or something smaller.
  29. ;
  30. ;-
  31.  
  32.  
  33.     if DF lt 0 THEN BEGIN
  34.        print,'student1_t - degrees of freedom'
  35.        print, ' must be larger than 0.'
  36.        return,-1
  37.     ENDIF
  38.     return, 1 - .5*betai (DF/(DF + X^2), DF/2.0, .5) 
  39.     end 
  40.  
  41.